
import { lazy,Suspense } from 'react'
import {Navigate} from 'react-router-dom'

var NotFound = lazy(()=>import('@/views/NotFound/NotFound.tsx'))

var CheckNav = lazy(()=>import('@/views/Index/JIN/CheckNav.tsx'))
// 导入考勤管理文件
var Checkin = lazy(()=>import('../views/Index/JIN/Checkin/CheckinM.jsx'))
var AddCheck = lazy(()=>import('../views/Index/JIN/Checkin/AddCheck.jsx'))
// 导入班次管理文件
var Classes = lazy(()=> import('../views/Index/JIN/Classes/Classes.jsx'))
var AddClasses = lazy(()=>import('../views/Index/JIN/Classes/AddClasses.jsx'))
// 导入打卡管理文件
var Clock = lazy(()=> import('../views/Index/JIN/ClockIn/Clock.tsx'))
// 导入考勤表文件
var Sheet = lazy(()=> import('../views/Index/JIN/Sheet/Sheet.tsx'))
var Userinfo = lazy(()=> import('../views/Index/JIN/Sheet/Userinfo.tsx'))
var Set = lazy(()=> import('../views/Index/JIN/Set/Set.tsx'))
export default [
    {
        path:'/index/checknav',
        element: <CheckNav />,
        children:[
            // 考勤管理路由
            {
                path:'/index/checknav/check',
                element:<Suspense><Checkin/></Suspense>
            },
            {
                path:'/index/checknav/addcheck',
                element:<Suspense><AddCheck/></Suspense>
            },
            // 班次管理路由
            {
                path:'/index/checknav/class',
                element:<Suspense><Classes/></Suspense>
            },
            {
                path:'/index/checknav/addclass',
                element:<Suspense><AddClasses/></Suspense>
            },
            // 打卡路由
            {
                path:'/index/checknav/clock',
                element:<Suspense><Clock/></Suspense>
            },
            // 考勤表路由
            {
                path:'/index/checknav/sheet',
                element:<Suspense><Sheet/></Suspense>
            },
            {
                path:'/index/checknav/userinfo',
                element:<Suspense><Userinfo/></Suspense>
            },
            {
                path:'/index/checknav/set',
                element:<Suspense><Set/></Suspense>
            },
            {
                path:'/index/checknav',
                element: <Navigate to="/index/checknav/check" />
            },
    
        ]
    }
]